
<%@ page import="com.afb.HHPredJob" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'HHPredJob.label', default: 'HHPredJob')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
        <script type="text/javascript">
function toggle() {
	var ele = document.getElementById("toggleText");
	var text = document.getElementById("displayText");
	if(ele.style.display == "block") {
    		ele.style.display = "none";
		text.innerHTML = "Show";
  	}
	else {
		ele.style.display = "block";
		text.innerHTML = "Hide";
	}
}


function codename() {

if(document.formname.checkboxname.checked)
{
document.formname.textname.disabled=false;
}

else
{
document.formname.textname.disabled=true;
}
}



</script>

    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
        </div>
        <div  class="body">
            <h1><g:message code="default.create.label" args="[entityName]" /></h1>

            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${HHPredJobInstance}">
            <div class="errors">
                <g:renderErrors bean="${HHPredJobInstance}" as="list" />
            </div>
            </g:hasErrors>

            <g:form name="formname" action="save" method="post" enctype="multipart/form-data">

                <div class="dialog">

                  <div class="tabberlive">
                  <div id="barratitulo" class="barra" style="background-color:#F8F8F8;text-align:left;padding-left:20px">
                          <label> Job Description </label>
			</div>
                          <div class="tabbertab">
                    <table>
                        <tbody>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name"><g:message code="HHPredJob.name.label" default="Name" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'name', 'errors')}">
                                    <g:textField name="name" value="${HHPredJobInstance?.name}" cols="300" rows="10" />
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="description"><g:message code="HHPredJob.description.label" default="Description" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'description', 'errors')}">
                                    <g:textArea name="description" value="${HHPredJobInstance?.description}" cols="300" rows="10"  />
                                </td>
                            </tr>


                            </tbody>

                                                </table>

                  </div>

                    <br/>

			<div id="barratitulo" class="barra" style="background-color:#F8F8F8;text-align:left;padding-left:20px">
                          <label> Search Options </label>
			</div>

                   <div class="tabbertab">
                    <table>
                        <tbody>

                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="proteinSequences"><g:message code="HHPredJob.proteinSequences.label" default="Protein Sequences" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'proteinSequences', 'errors')}">
                                    <g:textArea id="styled" name="proteinSequences"  value="${HHPredJobInstance?.proteinSequences}" />
                                </td>
                            </tr>


                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="proteinSequencesZIP"><g:message code="HHPredJob.proteinSequences.label" default="Protein Sequences" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'proteinSequences', 'errors')}">
                                  <input id="fileUpload" size="100%" type="file" name="proteinSequencesZIP"/>
                                  <!--
                                    <g:textArea id="styled" name="proteinSequences" cols="100" rows="10" value="${HHPredJobInstance?.proteinSequences}" />
                                  -->
                                </td>
                            </tr>


                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="hmmDatabases"><g:message code="HHPredJob.hmmDatabases.label" default="Hmm Databases" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'hmmDatabases', 'errors')}">
                                    <g:select name="hmmDatabases" from="${HHPredJobInstance.constraints.hmmDatabases.inList}" value="${HHPredJobInstance?.hmmDatabases}" valueMessagePrefix="HHPredJob.hmmDatabases"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="maxPsiBlastIterations"><g:message code="HHPredJob.maxPsiBlastIterations.label" default="Max Psi Blast Iterations" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'maxPsiBlastIterations', 'errors')}">
                                    <g:select name="maxPsiBlastIterations" from="${0..10}" value="${fieldValue(bean: HHPredJobInstance, field: 'maxPsiBlastIterations')}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="scoreSecondaryStructure"><g:message code="HHPredJob.scoreSecondaryStructure.label" default="Score Secondary Structure" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'scoreSecondaryStructure', 'errors')}">
                                    <g:select name="scoreSecondaryStructure" from="${HHPredJobInstance.constraints.scoreSecondaryStructure.inList}" value="${HHPredJobInstance?.scoreSecondaryStructure}" valueMessagePrefix="HHPredJob.scoreSecondaryStructure"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="alignmentMode"><g:message code="HHPredJob.alignmentMode.label" default="Alignment Mode" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'alignmentMode', 'errors')}">
                                    <g:select name="alignmentMode" from="${HHPredJobInstance.constraints.alignmentMode.inList}" value="${HHPredJobInstance?.alignmentMode}" valueMessagePrefix="HHPredJob.alignmentMode"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="realignWithMac"><g:message code="HHPredJob.realignWithMac.label" default="Realign With Mac" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'realignWithMac', 'errors')}">
                                    <g:checkBox name="realignWithMac" value="${HHPredJobInstance?.realignWithMac}" />
                                </td>
                            </tr>
                            </tbody>

                                                </table>

                  </div>




<!--
<div id="toggleText" style="display: none"><h1>peek-a-boo</h1></div>
-->

<br/>
			<div id="barra" class="barra" style="background-color:#ff9900;text-align:left;padding-left:20px">
                          <label> More options </label><a id="displayText" href="javascript:toggle();"> Show</a>
			</div>
<br/>



                  <div class="tabbertab" id="toggleText" style="display: none">
			<div id="barratitulo" class="barra" style="background-color:#F8F8F8;text-align:left;padding-left:20px">
                          <label> More Options </label>
			</div>
                                                <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="eValueThresholdPsiBlast"><g:message code="HHPredJob.eValueThresholdPsiBlast.label" default="E-Value Threshold Psi Blast" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'eValueThresholdPsiBlast', 'errors')}">
                                    <g:select name="eValueThresholdPsiBlast" from="${HHPredJobInstance.constraints.eValueThresholdPsiBlast.inList}" value="${HHPredJobInstance?.eValueThresholdPsiBlast}" valueMessagePrefix="HHPredJob.eValueThresholdPsiBlast"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="minCoveragePsiBlastHits"><g:message code="HHPredJob.minCoveragePsiBlastHits.label" default="Min Coverage Psi Blast Hits" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'minCoveragePsiBlastHits', 'errors')}">
                                    <g:select name="minCoveragePsiBlastHits" from="${HHPredJobInstance.constraints.minCoveragePsiBlastHits.inList}" value="${HHPredJobInstance?.minCoveragePsiBlastHits}" valueMessagePrefix="HHPredJob.minCoveragePsiBlastHits"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="minSequenceIdentityOfPsiBlastHitsWithQuery"><g:message code="HHPredJob.minSequenceIdentityOfPsiBlastHitsWithQuery.label" default="Min Sequence Identity Of Psi Blast Hits With Query" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'minSequenceIdentityOfPsiBlastHitsWithQuery', 'errors')}">
                                    <g:select name="minSequenceIdentityOfPsiBlastHitsWithQuery" from="${HHPredJobInstance.constraints.minSequenceIdentityOfPsiBlastHitsWithQuery.inList}" value="${HHPredJobInstance?.minSequenceIdentityOfPsiBlastHitsWithQuery}" valueMessagePrefix="HHPredJob.minSequenceIdentityOfPsiBlastHitsWithQuery"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="macRealignmentThreshold"><g:message code="HHPredJob.macRealignmentThreshold.label" default="Mac Realignment Threshold" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'macRealignmentThreshold', 'errors')}">
                                    <g:select name="macRealignmentThreshold" from="${HHPredJobInstance.constraints.macRealignmentThreshold.inList}" value="${HHPredJobInstance?.macRealignmentThreshold}" valueMessagePrefix="HHPredJob.macRealignmentThreshold"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="compositionalBiasCorrection"><g:message code="HHPredJob.compositionalBiasCorrection.label" default="Compositional Bias Correction" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'compositionalBiasCorrection', 'errors')}">
                                    <g:checkBox name="compositionalBiasCorrection" value="${HHPredJobInstance?.compositionalBiasCorrection}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="showSequencesPerHMM"><g:message code="HHPredJob.showSequencesPerHMM.label" default="Show Sequences Per HMM" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'showSequencesPerHMM', 'errors')}">
                                    <g:select name="showSequencesPerHMM" from="${HHPredJobInstance.constraints.showSequencesPerHMM.inList}" value="${HHPredJobInstance?.showSequencesPerHMM}" valueMessagePrefix="HHPredJob.showSequencesPerHMM"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="widthOfAlignments"><g:message code="HHPredJob.widthOfAlignments.label" default="Width Of Alignments" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'widthOfAlignments', 'errors')}">
                                    <g:textField name="widthOfAlignments" value="${fieldValue(bean: HHPredJobInstance, field: 'widthOfAlignments')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="minProbabilityInHitList"><g:message code="HHPredJob.minProbabilityInHitList.label" default="Min Probability In Hit List" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'minProbabilityInHitList', 'errors')}">
                                    <g:textField name="minProbabilityInHitList" value="${fieldValue(bean: HHPredJobInstance, field: 'minProbabilityInHitList')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="maxNumberOfHitsInHitList"><g:message code="HHPredJob.maxNumberOfHitsInHitList.label" default="Max Number Of Hits In Hit List" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'maxNumberOfHitsInHitList', 'errors')}">
                                    <g:textField name="maxNumberOfHitsInHitList" value="${fieldValue(bean: HHPredJobInstance, field: 'maxNumberOfHitsInHitList')}" />
                                </td>
                            </tr>
                        


<g:ifUserHasRole roles="Administrator">
                            <tr class="prop">
</g:ifUserHasRole>
<g:ifUserHasRole roles="Registered">
                            <tr id="notvisible" class="prop">
</g:ifUserHasRole>
                                <td valign="top" class="name">
                                    <label for="user"><g:message code="HHPredJob.user.label" default="User" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: HHPredJobInstance, field: 'user', 'errors')}">
                                  <!--
                                    <g:select name="user.id" from="${com.afb.User.list()}" optionKey="id" value="${HHPredJobInstance?.user?.id}"  />
                                   -->
                                    <g:select name="user.id" from="${com.afb.User.list()}" optionKey="id" value="${session?.user.id}"  />
                                </td>
                            </tr>


                        </tbody>
                    </table>

                  </div>
                    </div>


                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
